Skip to contentSkip to conversation

Broken map generation in Northgard game

Bug 105532 [email protected] 1 participant 11 messages Mar 15, 2018 – Jul 25, 2018

lore
Share & tools
lore
#0 lore raw

https://bugs.freedesktop.org/show_bug.cgi?id=105532

Bug ID: 105532
Summary: Broken map generation in Northgard game
Product: Mesa
Version: unspecified
Hardware: Other
OS: All
Status: NEW
Severity: normal
Priority: medium
Component: Drivers/Gallium/radeonsi
Assignee: [email protected]
Reporter: [email protected]
QA Contact: [email protected]

Created attachment 138148
--> https://bugs.freedesktop.org/attachment.cgi?id=138148&action=edit
northgard_screenshot.png

Map generation is broken in Northgard game in single player mode. See screenshot. Game developers describe map generation process as follows [1]:
"The game rendering seems to be working fine, only map generation seems to be broken on some drivers. This involves rendering 2D vectorized shapes and then reading back the resulting graphics buffer. Nothing fancy, but we had some issues in OpenGL with some Intel HD drivers on Windows in the past. Using DirectX (same code, just different driver) did fix the issue for these users."

Map generation is working fine with llvmpipe driver (LIBGL_ALWAYS_SOFTWARE=true).

OpenGL renderer string: AMD Radeon (TM) R9 380 Series (TONGA / DRM 3.19.0 / 4.14.26-gentoo, LLVM 6.0.0)

[1]
http://steamcommunity.com/app/466560/discussions/0/1698293255121560931/?ctp=4#c1698293255133166837

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#1 lore raw

https://bugs.freedesktop.org/show_bug.cgi?id=105532

--- Comment #1 from Alexander Tsoy <[email protected]> --- Also very often map generation process just hangs or repeat many times (according to the progress bar).

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#2 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=105532

--- Comment #2 from Nicolas Cannasse <[email protected]> --- Hi,

I'm Northgard technical director.

We are creating buffers to draw various 2D shapes into textures for map generation. Then we download the textures from GPU to CPU for additional processing. These textures are then used to generate the landscape. For some reason unknown to us the textures generated in some case appears to be corrupted, resulting in these weird height maps. We haven't been able to investigate the issue in details atm.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#3 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=105532

--- Comment #3 from Timothy Arceri <[email protected]> --- (In reply to Nicolas Cannasse from comment #2)

Quoted 10 lines

Hi,

I'm Northgard technical director.

We are creating buffers to draw various 2D shapes into textures for map generation. Then we download the textures from GPU to CPU for additional processing. These textures are then used to generate the landscape. For some reason unknown to us the textures generated in some case appears to be corrupted, resulting in these weird height maps. We haven't been able to investigate the issue in details atm.

If you could capture a trace of the issue in renderdoc or apitrace [1] upload it somewhere and provide the link we might be able to investigate it. But currently I can't get a trace because the HashLink virtual machine crashes. Maybe you guys could try compiling with HL/C and try grabbing a trace with the binary?

[1] https://github.com/apitrace/apitrace

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#4 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=105532

Christian Lanig <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]

--- Comment #4 from Christian Lanig <[email protected]> --- I have looked in the game folder. It seems like the game is using Haxe. I don't really know what Haxe is but in the folder there is also Northgard.exe and several .dll files. So I assume that Haxe does something comparable to Wine.

Already having Wine 3.7 installed for another game I just ran: wine Northgard.exe and bingo, the game seems to run just fine - at least the map is OK and I could do basic stuff like building a house.

So assuming that Haxe is comparable to Wine and does run the Windows-executable as well, we might conclude that the data that Haxe passes the mesa drivers is not identical to the data that Wine passes them.

As a result I am quite sure that the key to the answer is in Haxe and not in the game executable.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#5 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=105532

--- Comment #5 from Alexander Tsoy <[email protected]> --- (In reply to Christian Lanig from comment #4) There are native linux binaries in the linux subfolder.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#6 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=105532

--- Comment #6 from Eric Engestrom <[email protected]> ---

Quoted 1 line

From a quick search, Haxe can be found on github [1] and its website [2] has

some explanations as well, including how it uses a bytecode VM [3] to work cross-platform (essentially the same way java does it).

[1] https://github.com/HaxeFoundation/haxe
[2] https://haxe.org
[3] https://hashlink.haxe.org

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#7 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=105532

--- Comment #7 from Christian Lanig <[email protected]> --- (In reply to Alexander Tsoy from comment #5)

Quoted 2 lines

(In reply to Christian Lanig from comment #4) There are native linux binaries in the linux subfolder.

Yes. You are right. I renamed Northgard.exe and the game still starts. I thought that Haxe would somewhere start the Windows binary after loading the data file because shipping it to Linux users didn't make that much sense to me. I'm sorry for the confusion.

Still, Haxe might be useful to localize the roots of the issue.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#8 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=105532

Alexander Tsoy <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

         Resolution|---                         |NOTOURBUG
             Status|NEW                         |RESOLVED

--- Comment #8 from Alexander Tsoy <[email protected]> --- Latest game update fixed this bug for me.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#10 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=105532

--- Comment #10 from Timothy Arceri <[email protected]> --- (In reply to Christian Lanig from comment #7)

Quoted 10 lines

(In reply to Alexander Tsoy from comment #5)

Quoted 2 lines

(In reply to Christian Lanig from comment #4) There are native linux binaries in the linux subfolder.

Yes. You are right. I renamed Northgard.exe and the game still starts. I thought that Haxe would somewhere start the Windows binary after loading the data file because shipping it to Linux users didn't make that much sense to me. I'm sorry for the confusion.

Still, Haxe might be useful to localize the roots of the issue.

As per my reply in comment 3. The game runs in the HashLink virtual machine. Which is why I was requesting a trace grabbed via a build of the game compiled with HL/C which produces a native binary instead.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel